import request  from '@/utils/request.js'

// 获取品牌管理的列表
export const reqtradeMarkList = (page, limit)=>request({url: `/admin/product/baseTrademark/${page}/${limit}`, method: 'get'})

// 新增品牌:新增时id是由服务器自动生成的/修改品牌
export const reqAddOrUpdateTradeMark = (tradeMark)=> {
    if(tradeMark.id) {
        return request({url: '/admin/product/baseTrademark/update', method: 'put', data: tradeMark})
    } else {
        return request({url: '/admin/product/baseTrademark/save', method: 'post', data: tradeMark})
    }
}

// 删除品牌
export const reqDeleteTradeMark = (id)=>{
    return request({url: `/admin/product/baseTrademark/remove/${id}`, method: 'delete'})
}


